package com.feib.soeasy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * @title (#)Group.java<br>
 * @description 帳單業者<br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/11/7 create by Jimmy Liu<br>
 */
@Entity
@Table(name = "APP_GROUP")
public class Group extends AuditEntity {
    
    private static final long serialVersionUID = -5114913565343444425L;
    
    /**
     * 銀行
     */
    public static final Integer GROUP_TYPE_BANK = new Integer(1);
    
    /**
     * 帳單業者-學校
     */
    public static final Integer GROUP_TYPE_SCHOOL = new Integer(2);
    
    /**
     * 帳單業者-管委會
     */
    public static final Integer GROUP_TYPE_MANAGEMENT_COMMITTEE = new Integer(3);
    
    /**
     * PK in Table
     */
    private Long groupPk;
    
    /**
     * 群組代號/帳單業者代號</br>
     * 統一編號+3碼流水號
     */
    private String groupNo;
    
    /**
     * 群組名稱
     */
    private String groupName;
    
    /**
     * 群組類別<br>
     * 1: Bank
     * 2: 帳單業者-學校<br>
     * 3: 帳單業者-管委會<br>
     */
    private Integer groupType;
    
    /* 第二階段加入欄位 2011.01.31 */
    
    /**
     * 主辦銀行<br />
     * ex:遠東銀行台北忠孝分行 (805-0311)
     */
    private String mainBank;
    
    /**
     * 聯絡人姓名
     */
    private String contactName;
    
    /**
     * 聯絡人EMAIL
     */
    private String contactEmail;
    
    /**
     * 聯絡人電話
     */
    private String contactTelNo;
    
    /**
     * 聯絡人手機
     */
    private String contactCellNo;
    
    /**
     * 地址
     */
    private String groupAddress;
    
    /**
     * 備註
     */
    private String groupNote;
    
    
	private String postAcct;
	
	private Long bankAmount;
	
	private Long postAmount;
	
	private Long atmAmount;
	
	private Long remittanceAmount;
	
	private Long chainstoreAmount;
	
	private Long otherAmount;
	
    private Long postLevel1;
	
	private Long postLevel2;
	
	private Long postLevel3;
	

	 /**
     * ACH業者代號</br>
     * 統一編號+4位序號 (EDIID)
     */
    private String achEdiid;
    
    
    
	
	/* 20120828 自行繳款之「帳務處理費」計算   */
	
	private Long selfAmount;

    
    
	@Column(name="SELF_AMOUNT")
    public Long getSelfAmount() {
		return selfAmount;
	}

    
	public void setSelfAmount(Long selfAmount) {
		this.selfAmount = selfAmount;
	}


	/**
     * @return the groupPk
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="GROUP_PK", nullable=false)
    public Long getGroupPk() {
        return groupPk;
    }

    
    /**
     * @param groupPk the groupPk to set
     */
    public void setGroupPk(Long groupPk) {
        this.groupPk = groupPk;
    }

    
    
    /**
     * @return the groupNo
     */
    @Column(name="GROUP_NO", nullable=false, unique=true, length=12)
    public String getGroupNo() {
        return groupNo;
    }


    
    /**
     * @param groupNo the groupNo to set
     */
    public void setGroupNo(String groupNo) {
        this.groupNo = groupNo;
    }


    /**
     * @return the groupName
     */
    @Column(name="GROUP_NAME", nullable=false, length=100)
    public String getGroupName() {
        return groupName;
    }

    
    /**
     * @param groupName the groupName to set
     */
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    
    /**
     * @return the groupType
     */
    @Column(name="GROUP_TYPE", nullable=false)
    public Integer getGroupType() {
        return groupType;
    }

    
    /**
     * @param groupType the groupType to set
     */
    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }


    
    /**
     * @return the contactName
     */
    @Column(name="CONTACT_NAME", length=50)
    public String getContactName() {
        return contactName;
    }


    
    /**
     * @param contactName the contactName to set
     */
    public void setContactName(String contactName) {
        this.contactName = contactName;
    }


    
    /**
     * @return the contactEmail
     */
    @Column(name="CONTACT_EMAIL", length=100)
    public String getContactEmail() {
        return contactEmail;
    }


    
    /**
     * @param contactEmail the contactEmail to set
     */
    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }


    
    /**
     * @return the contactTelNo
     */
    @Column(name="CONTACT_TELNO", length=30)
    public String getContactTelNo() {
        return contactTelNo;
    }


    
    /**
     * @param contactTelNo the contactTelNo to set
     */
    public void setContactTelNo(String contactTelNo) {
        this.contactTelNo = contactTelNo;
    }


    
    /**
     * @return the contactCellNo
     */
    @Column(name="CONTACT_CELLNO", length=30)
    public String getContactCellNo() {
        return contactCellNo;
    }


    
    /**
     * @param contactCellNo the contactCellNo to set
     */
    public void setContactCellNo(String contactCellNo) {
        this.contactCellNo = contactCellNo;
    }


    
    /**
     * @return the groupAddress
     */
    @Column(name="GROUP_ADDRESS", length=250)
    public String getGroupAddress() {
        return groupAddress;
    }


    
    /**
     * @param groupAddress the groupAddress to set
     */
    public void setGroupAddress(String groupAddress) {
        this.groupAddress = groupAddress;
    }


    
    /**
     * @return the groupNote
     */
    @Column(name="GROUP_NOTE", length=100)
    public String getGroupNote() {
        return groupNote;
    }


    
    /**
     * @param groupNote the groupNote to set
     */
    public void setGroupNote(String groupNote) {
        this.groupNote = groupNote;
    }

    /**
     * @return the mainBank
     */
    @Column(name="MAIN_BANK", length=255)
    public String getMainBank() {
        return mainBank;
    }


    
    /**
     * @param mainBank the mainBank to set
     */
    public void setMainBank(String mainBank) {
        this.mainBank = mainBank;
    }
    
    @Column(name="POST_ACCT", length=8)
    public String getPostAcct() {
		return postAcct;
	}


	public void setPostAcct(String postAcct) {
		this.postAcct = postAcct;
	}

	@Column(name="BANK_AMOUNT", nullable=false)
	public Long getBankAmount() {
		return bankAmount;
	}


	public void setBankAmount(Long bankAmount) {
		this.bankAmount = bankAmount;
	}

	@Column(name="POST_AMOUNT", nullable=false)
	public Long getPostAmount() {
		return postAmount;
	}


	public void setPostAmount(Long postAmount) {
		this.postAmount = postAmount;
	}

	@Column(name="ATM_AMOUNT", nullable=false)
	public Long getAtmAmount() {
		return atmAmount;
	}


	public void setAtmAmount(Long atmAmount) {
		this.atmAmount = atmAmount;
	}

	@Column(name="REMITTANCE_AMOUNT", nullable=false)
	public Long getRemittanceAmount() {
		return remittanceAmount;
	}


	public void setRemittanceAmount(Long remittanceAmount) {
		this.remittanceAmount = remittanceAmount;
	}

	@Column(name="CHAINSTORE_AMOUNT", nullable=false)
	public Long getChainstoreAmount() {
		return chainstoreAmount;
	}


	public void setChainstoreAmount(Long chainstoreAmount) {
		this.chainstoreAmount = chainstoreAmount;
	}


	@Column(name="OTHER_AMOUNT", nullable=false)
	public Long getOtherAmount() {
		return otherAmount;
	}


	public void setOtherAmount(Long otherAmount) {
		this.otherAmount = otherAmount;
	}
	
	@Column(name="POST_LEVEL1", nullable=false)
	public Long getPostLevel1() {
		return postLevel1;
	}


	public void setPostLevel1(Long postLevel1) {
		this.postLevel1 = postLevel1;
	}
	
	@Column(name="POST_LEVEL2", nullable=false)
	public Long getPostLevel2() {
		return postLevel2;
	}


	public void setPostLevel2(Long postLevel2) {
		this.postLevel2 = postLevel2;
	}
	
	@Column(name="POST_LEVEL3", nullable=false)
	public Long getPostLevel3() {
		return postLevel3;
	}


	public void setPostLevel3(Long postLevel3) {
		this.postLevel3 = postLevel3;
	}

	@Column(name="ACH_EDIID", length=12)
	public String getAchEdiid() {
		return achEdiid;
	}
	
	public void setAchEdiid(String achEdiid) {
		this.achEdiid = achEdiid;
	}


	
	
}
